import { defineStore } from "pinia";

export const useUserStore = defineStore("userStore", {
  state: () => ({
    name: "John",
    age: 25,
  }),
  actions: {
    updateName(newName: string) {
      this.name = newName;
    },
    increaseAge() {
      this.age++;
    },
    refreshPage() {
      location.reload();
    },
  },
});

export const utilStore = defineStore("utilsStore", {
  state: () => ({
    refreshNode: 0,
  }),
  actions: {},
});
